const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
    //跨域请求代理
    devServer:{
      proxy:{
        "/foo":{//
          target:'https://bang.360.cn',//真实的请求接口地址
          ws: true,//https
          changeOrigin: true,//是否允许代理请求
          pathRewrite:{//路径重写
            "^/foo":''   // -->/foo/xxx/xxx
          }
        },
        '/api':{
          target:'https://www.qyer.com',
          ws: true,//https
          changeOrigin: true,//是否允许代理请求
          pathRewrite:{//路径重写
            "^/api":''   
          }
        },
        //http://localhost:5566
        '/boo':{
          target:'http://localhost:5566',
          ws: true,//https
          changeOrigin: true,//是否允许代理请求
          pathRewrite:{//路径重写
            "^/boo":''   
          }
        },
      }
    }
})
